﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Ue.Infrastructure.Data
{
    public interface IUnitOfWork
    {
        void RegisterAdded<TEntity, TKey>(TEntity entity, IUnitOfWorkRepository<TEntity,TKey> repository)
            where TEntity : IEntity<TKey>;

        void RegisterModified<TEntity, TKey>(TEntity entity, IUnitOfWorkRepository<TEntity, TKey> repository)
            where TEntity : IEntity<TKey>;

        void RegisterDeleted<TEntity, TKey>(TEntity entity, IUnitOfWorkRepository<TEntity, TKey> repository)
            where TEntity : IEntity<TKey>;

        void Commit();

        //void Rollback();
    }
}
